package cqupt.spark_log.entity;

import java.util.Date;

public class Task {
	private String taskId;
	private String index;
	private Date startTime;
	private Date endTime;
	private long runTime;
	private long executorDeserializeTime;
	private long executorDeserializeCpuTime;
	private long executorRunTime;
	private long executorCpuTime;
	private long jvmGCTime;
	private long resultSerializationTime;
	private double ec;
	private String appName;
	private String jobId;
	private String stageId;
	private String executorId;
	
	public Task(String taskId, String index, Date startTime, String appName, String jobId, String stageId, String executorId) {
		this.taskId = taskId;
		this.index = index;
		this.startTime = startTime;
		this.appName = appName;
		this.jobId = jobId;
		this.stageId = stageId;
		this.executorId = executorId;
	}
	
	
	public String getTaskId() {
		return taskId;
	}


	public void setTaskId(String taskId) {
		this.taskId = taskId;
	}


	public Date getStartTime() {
		return startTime;
	}


	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}


	public Date getEndTime() {
		return endTime;
	}


	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}


	public long getRunTime() {
		return runTime;
	}


	public void setRunTime(long runTime) {
		this.runTime = runTime;
	}


	public double getEc() {
		return ec;
	}


	public synchronized void setEc(double ec) {
		this.ec = ec;
	}


	public String getAppName() {
		return appName;
	}


	public void setAppName(String appName) {
		this.appName = appName;
	}


	public String getJobId() {
		return jobId;
	}


	public void setJobId(String jobId) {
		this.jobId = jobId;
	}


	public String getStageId() {
		return stageId;
	}


	public void setStageId(String stageId) {
		this.stageId = stageId;
	}


	public String getExecutorId() {
		return executorId;
	}


	public void setExecutorId(String executorId) {
		this.executorId = executorId;
	}

	public String getIndex() {
		return index;
	}
	
	public void setIndex(String index) {
		this.index = index;
	}
	
	public long getExecutorDeserializeTime() {
		return executorDeserializeTime;
	}


	public void setExecutorDeserializeTime(long executorDeserializeTime) {
		this.executorDeserializeTime = executorDeserializeTime;
	}


	public long getExecutorDeserializeCpuTime() {
		return executorDeserializeCpuTime;
	}


	public void setExecutorDeserializeCpuTime(long executorDeserializeCpuTime) {
		this.executorDeserializeCpuTime = executorDeserializeCpuTime;
	}


	public long getExecutorRunTime() {
		return executorRunTime;
	}


	public void setExecutorRunTime(long executorRunTime) {
		this.executorRunTime = executorRunTime;
	}


	public long getExecutorCpuTime() {
		return executorCpuTime;
	}


	public void setExecutorCpuTime(long executorCpuTime) {
		this.executorCpuTime = executorCpuTime;
	}


	public long getJvmGCTime() {
		return jvmGCTime;
	}


	public void setJvmGCTime(long jvmGCTime) {
		this.jvmGCTime = jvmGCTime;
	}


	public long getResultSerializationTime() {
		return resultSerializationTime;
	}


	public void setResultSerializationTime(long resultSerializationTime) {
		this.resultSerializationTime = resultSerializationTime;
	}


	@Override
	public String toString() {
		return "Task [taskId=" + taskId + ", index=" + index + ", startTime=" + startTime + ", endTime=" + endTime
				+ ", runTime=" + runTime + ", executorDeserializeTime=" + executorDeserializeTime
				+ ", executorDeserializeCpuTime=" + executorDeserializeCpuTime + ", executorRunTime=" + executorRunTime
				+ ", executorCpuTime=" + executorCpuTime + ", jvmGCTime=" + jvmGCTime + ", resultSerializationTime="
				+ resultSerializationTime + ", ec=" + ec + ", appName=" + appName + ", jobId=" + jobId + ", stageId="
				+ stageId + ", executorId=" + executorId + "]";
	}
}
